package com.example.dessert.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.dessert.dao.RegionMapper;
import com.example.dessert.entity.Region;
import com.example.dessert.service.RegionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class RegionServiceImpl implements RegionService {

    @Resource
    private RegionMapper regionMapper;

    @Override
    public List<Region> queryChildrenById(Long parent_id) {

        QueryWrapper<Region> wrapper = new QueryWrapper<>();
        wrapper.eq("parent_id",parent_id);
        List<Region> region = regionMapper.selectList(wrapper);

        return region;
    }






}
